package com.swx.tio;

import java.io.*;

import org.apache.log4j.Logger;

public class work02 {
	private static final Logger logger = Logger.getLogger(work02.class);

	public static void main(String[] args) throws IOException {
		FileInputStream in = new FileInputStream("f:\\jiami.txt");
		FileOutputStream out = new FileOutputStream("f:\\jiemi.txt");
		byte[] ch = new byte[1024];
		int n = 0;
		String context = null;
		while ((n = in.read(ch, 0, ch.length)) != -1) {
			for (int i = 0; i < ch.length; i++) {
				
				ch[i] = (byte) (ch[i] ^ 'S');
			}
			context = new String(ch, 0, n);
			out.write(context.getBytes());
		}
		System.out.println(context);
		out.close();

	}
}
